
/*
 * Copyright (C) 2008-2009 Archie L. Cobbs. All rights reserved.
 *
 * $Id$
 */

package org.dellroad.sidekar;

public abstract class SchemaElement extends SchemaObject {

    private final Schema schema;

    private String name;

    SchemaElement(Schema schema, String name) {
        super(schema.getDatabase());
        this.schema = schema;
        this.name = name;
    }

    /**
     * Get the {@link Schema} that this instance is associated with.
     */
    public Schema getSchema() {
        return this.schema;
    }

    /**
     * Get the name of this schema element.
     */
    public String getName() {
        return this.name;
    }

    // Change this instance's name
    void setName(String name) {
        this.name = name;
    }
}

